package ai.people.platform.archives.mapper;

import ai.people.netmon.framework.domain.archives.entity.ArchivesBaseInfo;
import ai.people.netmon.framework.domain.archives.entity.GangGroupArchivesBO;
import ai.people.netmon.framework.domain.archives.entity.GangGroupOrgPersonBO;
import ai.people.netmon.framework.domain.archives.request.ArchivesRequest;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zhenglin
 * @since 2022-03-30
 */
@Mapper
public interface ArchivesBaseInfoMapper extends BaseMapper<ArchivesBaseInfo> {

    Page<ArchivesBaseInfo> pageCustom(Page<ArchivesBaseInfo> page, ArchivesRequest request);

    /**
     * 我档案页
     *
     * @param request 请求
     * @param userId  用户id
     * @return {@link List}<{@link ArchivesBaseInfo}>
     */
    List<ArchivesBaseInfo> myArchivesPage(ArchivesRequest request, Long userId);


    /**
     * 统计我的档案
     *
     * @param request 请求
     * @param userId  用户id
     * @return long
     */
    long myArchivesCount(ArchivesRequest request, Long userId);

    /**
     * 更新坐标轴id
     *
     * @param archivesBaseInfo 档案基本信息
     */
    void updateCoordinateAxisById(ArchivesBaseInfo archivesBaseInfo);

    List<GangGroupArchivesBO> selectGangGroup();

    GangGroupArchivesBO getForGangGroup(Long id);

    List<GangGroupOrgPersonBO> listForGangGroup(Set<String> archivesIds);

    boolean updateUpdateTime(Set<Long> upArchivesIds);
}
